<#assign menu="customTagHtml">
<#assign submenu="add_customTagHtml">
<#include "/system/head.ftl">
<!--main content start-->
<section id="main-content">
	<section class="wrapper">
		<!-- page start-->
		<form id="add_customTagHtml_form" class="form-horizontal" action="${basePath}/admin/customTagHtml/addNew.json"  autocomplete="off"  method="post"
			enctype="multipart/form-data">
		<div class="row">
			<div class="col-lg-12">
				<section class="panel">
					<header class="panel-heading"> 
						增加自定义标签
					</header>
					
					<div class="panel-body">
						<div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">自定义标签名称</label>
                          <div class="col-sm-10">
                              <input type="text" style="font-size:15px;width: 300px;" class="form-control" name="customTagHtml.name"
                              	placeholder="自定义标签名称" id="name"  >
                              </input>
                          </div>
                        </div>                              
						<div class="form-group">
                              <label class="col-sm-2 col-sm-2 control-label">自定义标签内容</label>
                              <div class="col-sm-10">
                                  <textArea id="htmlContent" name="customTagHtml.htmlContent" class="col-sm-10" style="height: 200px;" placeholder="自定义标签内容"></textArea>
                              </div>
                        </div>
                        <div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">自定义标签状态</label>
                          <div class="col-sm-10" style="margin-bottom:10px;">
                          	<input name="customTagHtml.status" id="status" value="1" type="radio" checked> 显示
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input name="customTagHtml.status" value="0" type="radio"> 隐藏
                          </div>
                        </div>
                        <div class="form-group">
                      	  <div class="col-lg-offset-2 col-lg-10">
                          <button class="btn btn-shadow btn-primary" type="submit">发布</button>
                          </div>
                      </div>
					</div>
				</section>
			</div>
		</div>
		</form>
		<!-- page end-->
	</section>
</section>
<!--main content end-->
<script type="text/javascript">
$(function(){
	$('#add_customTagHtml_form').ajaxForm({
		dataType : 'json',
		success : function(data) {
			if (data.result) {
				bootbox.alert("保存成功，将刷新页面", function() {
					window.location.reload();
				});
			}else{
			 	showErrors($('#add_customTagHtml_form'),data.errors);
			}
		},
		error:function(data,textstatus){
	        bootbox.alert({  
	            buttons: {  
	               ok: {  
	                    label: '关闭'
	               }  
	            },
	            message: data.responseText,
	            title: '<@spring.message "system.errorTip"/>',  
	        });
	     } 
	});
});
</script>
<#include "/system/foot.ftl">